<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../img/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/jquery-1.8.2.min.js"></script>
<script language="javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script language="javascript">
$(document).ready(function(){
	$("#cinema_id").change(function(){
		var cinema_id = $(this).val();
		var str = "<option value='0'>请选择影厅</option>";
		if(cinema_id != 0){
			$.getJSON('hall_set.php', {op:'get_hall', cinema_id:cinema_id}, function(data){
				$.each(data, function(i, item){
					str += "<option value='"+item.hall_id+"'>"+item.hall_name+"</option>";
				})
				$("#hall_id option").remove();
				$("#hall_id").append(str);
			});
		}else{
			$("#hall_id option").remove();
			$("#hall_id").append(str);
		}
	})
})

function checkSubmit(){
	if($("#cinema_id").val()==0 || $("#hall_id").val()==0 || $("#type").val()==0){
		alert("请选择正确的值！");
		return false;
	}else{
		return true;
	}
}

</script>
</head>
<body leftmargin='15' topmargin='10' bgcolor="#FFFFFF">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" style="border-bottom:1px solid #CCCCCC">
	<tr>
    	<td align='center' valign='top' colspan="2">
            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                <tr>
                    <td height="26" background="../img/newlinebg3.gif">
                        <table width="98%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="right">
                                    <input type='button' class="coolbg np" onClick="location='hall_set.php';" value='返回' />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
    	<td>
        	<table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr bgcolor="#FFFFFF">
                    <td height="4"></td>
                </tr>
            </table>
        </td>
    </tr>
  	<tr>
    	<td colspan="2">
      		<table width="800" border="0" cellpadding="0" cellspacing="0">
        		<tr>
          			<td width="84" height="24" align="center" background="../img/itemnote1.gif">添加影厅</td>
          			<td width="84"></td>
          			<td>&nbsp;</td>
        		</tr>
      		</table>
    	</td>
	</tr>
</table>
<form name="form1" action="hall_set.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
<table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset">
    	<td height="24" class="bline">
      		<table width="470" border="0" cellspacing="0" cellpadding="0">
                <tr>
          			<td width="78" height="50">&nbsp;影厅信息：</td>
          			<td width="392">
                    <select id="cinema_id" name="cinema_id">
                    	<option value="0">请选择影院</option>
                        <{foreach item=cinema from=$cinema_list}>
                        <option value="<{$cinema.CinemasId}>"><{$cinema.CinemasName}></option>
                        <{/foreach}>
                    </select>
                    <select id="hall_id" name="hall_id">
                    	<option value="0">请选择影厅</option>
                    </select>
                    <select id="type" name="type">
                    	<option value="0">请选择类型</option>
                        <option value="4D">4D</option>
                        <option value="DMAX">DMAX</option>
                        <option value="IMAX">IMAX</option>
                    </select>
                    </td>
        		</tr> 
      		</table>      
    	</td>
  	</tr>
    
</table>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    	<td height="56">
			<table width="98%" border="0" cellspacing="1" cellpadding="1">
        		<tr>
          			<td align="center">
          				<table width="214" border="0" cellspacing="0" cellpadding="0" >
              				<tr>
				                <td width="115">	
                                	<input type="hidden" name="op" value="save" />
				                    <input name="imageField" type="image" src="../img/button_ok.gif" width="60" height="22" class="np" border="0"  style="cursor:pointer; ">
				                </td>
				                <td width="99">
				                	<img src="../img/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer; ">
				                </td>
			              	</tr>
						</table>
					</td>
    			</tr>
			</table>
		</td>
	</tr>
</table>
</form>
</body>

</html>